<?php

namespace app\api\controller\intelligentlive;

use app\api\service\intelligentlive\ProductsService;
use think\Request;

class Products
{
    protected $Service;
    public function __construct()
    {
        $this->Service = ProductsService::getInstance();
    }

    public function addProducts(Request $request)
    {
        $params = $request->post();
        $result = $this->Service->addProducts($params);
        return writeJson(200,$result,"成功");
    }

    public function productsList(Request $request)
    {
        $params = $request->post();
        $result = $this->Service->productsList($params);
        return writeJson(200,$result,"获取成功");
    }
}